// 1.导入 request
import request from '@/utils/request.js'
// 注册用户个人信息
const updateUserInfoAPI = (userForm) => {
  return request({
    method: 'PUT',
    url: '/my/userinfo',
    data: userForm
  })
}

// 更新头像
const updateUserAvatarAPI = (avatarStr) => {
  return request({
    method: 'patch',
    url: '/my/update/avatar',
    data: {
      avatar: avatarStr
    }
  })
}

// 更新密码
const updatePwdAPI = (pwdForm) => {
  return request({
    method: 'patch',
    url: '/my/updatepwd',
    data: pwdForm
  })
}

// 3.导出
export { updateUserInfoAPI, updateUserAvatarAPI, updatePwdAPI }
